﻿@model EnterpriseFund.Model.TaxAuditForm
@{
    Layout = null;

    List<EnterpriseFund.Model.SupportPolicy> xzSupportPolicy = (ViewData["xzSupportPolicy"] == null ? new List<EnterpriseFund.Model.SupportPolicy>() : ViewData["xzSupportPolicy"] as List<EnterpriseFund.Model.SupportPolicy>);

    List<EnterpriseFund.Model.FinanceProp> financePropList = (ViewData["FinancePropList"] == null ? new List<EnterpriseFund.Model.FinanceProp>() : ViewData["FinancePropList"] as List<EnterpriseFund.Model.FinanceProp>);
    decimal baseSum = 0;
    decimal allowanceAmountSum = 0;
    decimal seSum = 0;

}
<!DOCTYPE html>
<html>
@Html.Partial("LoadPanelPartial")
<head>
    <title></title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/jquery-ui.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)
    <script type="text/javascript">

        $(document).ready(function () {
            lpModal.Hide();
            $("#toolMenu").smartFloat();
            $("#tabs").tabs();
            var hdjsAlert = $("#hdjsAlert").val();
            if (hdjsAlert != "") {
                alert(hdjsAlert);
            }
            if (hdjsAlert == "操作成功") {
                if ($("#hidFStatus").val() == "Save") {

                }
                else {
                    window.location.href = rootPath + '/TaxAuditPolicyEval/';
                }
            }
        });

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnSubmit":
                    {
                        Save("open");
                        break;
                    }
                case "btnSave":
                    {
                        Save("Save");
                        break;
                    }
                case "btnReturn":
                    {
                        var rs = window.showModalDialog(rootPath + "/ReturnDlg?tableName=t_TaxAuditForm&id=" + $("#hidFTaxAuditId").val() + "&feq=20");

                        if (rs == "S") {
                            window.location.href = rootPath + '/TaxAuditPolicyEval/';
                        }

                        break;
                    }
                case "btnback":
                    {
                        window.location.href = rootPath + '/TaxAuditPolicyEval/';
                    }

            }

        }

        function Save(FStatus) {
            lpModal.Show();
            $("#hidFStatus").val(FStatus);
            var b = document.getElementsByTagName("input");
            for (var i = 0; i < b.length; i++) {
                b[i].disabled = false;
            }
            form1.submit();
        }

        function look(no) {
            window.showModelessDialog(rootPath + "/TaxAuditPolicyEval/LookEntry?taxClassAllowanceNo=" + no + "&FTaxAuditId=" + $("#hidFTaxAuditId").val(), "", "dialogWidth=500px;dialogHeight=500px");
        }

        function Changed() {
            //            $.ajax({
            //                type: 'POST',
            //                url: rootPath + '/TaxPayerManager/GetList',
            //                data: { fEnterprisePropNo: ASPxClientComboBox.Cast("FEnterprisePropNo").GetValue() },
            //                success: function (result) {
            //                    ASPxClientComboBox.Cast("FFinancePropNo").ClearItems()
            //                    var List = JSON.parse(result);
            //                    for (var i = 0; i < List.length; i++) {
            //                        ASPxClientComboBox.Cast("FFinancePropNo").AddItem(List[i].FFinancePropName, List[i].FFinancePropNo, "");
            //                    }
            //                }
            //            });
            window.location.href = rootPath + '/TaxAuditPolicyEval/TaxAuditPolicyEvalEdit?taxAuditId=' + $("#hidFTaxAuditId").val() + "&FNewEnterprisePropNo=" + FEnterprisePropNo.GetValue();
        }

        function redValueChanged(no, type) {
            if (type != "2") {
                if ($("#" + no + "FIsEvalBase").val() == "Y") {

//                    document.getElementById(no + "txtFAllowanceAmount").disabled = true;
//                    document.getElementById(no + "txtrateOut").disabled = false;
//                    document.getElementById(no + "txtrateIn").disabled = false;
//                    document.getElementById(no + "txtbase").disabled = false;

                    $("#" + no + "txtFAllowanceAmount").attr("readonly", "readonly");
                    $("#" + no + "txtrateOut").removeAttr("readonly");
                    $("#" + no + "txtrateIn").removeAttr("readonly");
                    $("#" + no + "txtbase").removeAttr("readonly");

                    $("#" + no + "txtFAllowanceAmount").css('background-color', '#f7f7f7');
                    $("#" + no + "txtrateOut").css('background-color', '#ffffff');
                    $("#" + no + "txtrateIn").css('background-color', '#ffffff');
                    $("#" + no + "txtbase").css('background-color', '#ffffff');

                }
                else {
//                    document.getElementById(no + "txtFAllowanceAmount").disabled = true;
//                    document.getElementById(no + "txtrateOut").disabled = false;
//                    document.getElementById(no + "txtrateIn").disabled = true;
//                    document.getElementById(no + "txtbase").disabled = true;

                    $("#" + no + "txtFAllowanceAmount").attr("readonly", "readonly");
                    $("#" + no + "txtrateOut").removeAttr("readonly");
                    $("#" + no + "txtrateIn").attr("readonly", "readonly");
                    $("#" + no + "txtbase").attr("readonly", "readonly");

                    $("#" + no + "txtFAllowanceAmount").css('background-color', '#f7f7f7');
                    $("#" + no + "txtrateOut").css('background-color', '#ffffff');
                    $("#" + no + "txtrateIn").css('background-color', '#f7f7f7');
                    $("#" + no + "txtbase").css('background-color', '#f7f7f7');
                }
                ValueChanged3(document.getElementById(no + "FPolicyID"), no);
            }
            else {
//                document.getElementById(no + "txtFAllowanceAmount").disabled = false;
//                document.getElementById(no + "txtrateOut").disabled = true;
//                document.getElementById(no + "txtrateIn").disabled = true;
//                document.getElementById(no + "txtbase").disabled = true;
                $("#" + no + "txtrateIn").val("0");
                $("#" + no + "txtrateOut").val("0");

                $("#" + no + "txtFAllowanceAmount").removeAttr("readonly");
                $("#" + no + "txtrateOut").attr("readonly", "readonly");
                $("#" + no + "txtrateIn").attr("readonly", "readonly");
                $("#" + no + "txtbase").attr("readonly", "readonly");

                $("#" + no + "txtFAllowanceAmount").css('background-color', '#ffffff');
                $("#" + no + "txtrateOut").css('background-color', '#f7f7f7');
                $("#" + no + "txtrateIn").css('background-color', '#f7f7f7');
                $("#" + no + "txtbase").css('background-color', '#f7f7f7');
            }
            jsSum();
        }

        function ValueChanged(no) {
            var FYear = $("#hidFYear").val();
            var isp = $("#" + no + "FIsPolicy").val();
            if (isp == "Y") {
                var obj = document.getElementById(no + "FPolicyID");

                var FPolicyID = obj.options[obj.selectedIndex].value;
                var _base = $("#" + no + "txtbase").val();
                var rateIn = $("#" + no + "txtrateIn").val();
                var rateOut = $("#" + no + "txtrateOut").val();
                var se = $("#" + no + "txtse").val();
                $.ajax({
                    type: 'POST',
                    url: rootPath + '/TaxAuditPolicyEval/ComputePolicy',
                    data: { fpolicyID: FPolicyID, fyear: FYear, se: se, bases: _base, FInnerRate: rateIn, FOuterRate: rateOut },
                    success: function (result) {
                        $("#" + no + "txtFAllowanceAmount").val((result / 10000).toFixed(0))
                        jsSum();
                    }
                });
            }
            else {
                var rateOut = $("#" + no + "txtrateOut").val();
                var se = $("#" + no + "txtse").val();
                if (rateOut != "") {
                    $("#" + no + "txtFAllowanceAmount").val(((rateOut/100 * se)/10000).toFixed(0));
                }
                jsSum();
            }
        }

        function ValueChanged3(obj, no) {
            var FYear = $("#hidFYear").val();
            var isp = $("#" + no + "FIsPolicy").val();
            if (isp == "Y") {
                var FPolicyID = obj.options[obj.selectedIndex].value;
                var _base = $("#" + no + "txtbase").val();
                var se = $("#" + no + "txtse").val();
                $.ajax({
                    type: 'POST',
                    url: rootPath + '/TaxAuditPolicyEval/EditPolicy',
                    data: { fpolicyID: FPolicyID, fyear: FYear, se: se, bases: _base },
                    success: function (result) {
                        var sdata = result.split("||");
                        $("#" + no + "txtFAllowanceAmount").val((sdata[0]/10000).toFixed(0));
                        $("#" + no + "txtrateIn").val(sdata[1]);
                        $("#" + no + "txtrateOut").val(sdata[2]);
                        $("#" + no + "FIsEvalBase").val(sdata[3]);
                        jsSum();
                    }

                });
            }
        }

        function ValueChanged2(obj, no) {
            var FYear = $("#hidFYear").val();
            var FPolicyID = obj.options[obj.selectedIndex].value;
            var _base = $("#" + no + "txtbase").val();
            var se = $("#" + no + "txtse").val();
            $.ajax({
                type: 'POST',
                url: rootPath + '/TaxAuditPolicyEval/EditPolicy',
                data: { fpolicyID: FPolicyID, fyear: FYear, se: se, bases: _base },
                success: function (result) {
                    var sdata = result.split("||");
                    $("#" + no + "txtFAllowanceAmount").val((sdata[0]/10000).toFixed(0));
                    $("#" + no + "txtrateIn").val(sdata[1]);
                    $("#" + no + "txtrateOut").val(sdata[2]);
                    $("#" + no + "FIsEvalBase").val(sdata[3]);
                    redValueChanged(no, "1");

                    var obj = document.getElementsByName(no + "type");
                    for (i = 0; i < obj.length; i++) {
                        if (obj[i].value == "1") {
                            obj[i].checked = true;
                        }
                    }
                    jsSum();
                }
            });
        }

        function jsSum() {
            var no = $("#noList").val();
            var noList = no.split(',');
            var sesum = 0;
            var amSum = 0;
            var baseSum = 0;
            for (var i = 0; i < noList.length; i++) {
                if ($("#" + noList[i] + "txtse").val() != "") {
                    sesum += Number($("#" + noList[i] + "txtse").val());
                }
                if ($("#" + noList[i] + "txtFAllowanceAmount").val() != "") {
                    amSum += Number($("#" + noList[i] + "txtFAllowanceAmount").val());
                }
                if ($("#" + noList[i] + "txtbase").val() != "") {
                    baseSum += Number($("#" + noList[i] + "txtbase").val());
                }
            }
            $("#zjallowanceAmount").text(amSum.toFixed(0));
            $("#zjse").text(sesum.toFixed(0));
            $("#zjbase").text(baseSum.toFixed(0));
        }

    </script>
    <style>
       .tableStyle {
width: 100%;
border: solid 1px #E1E4E8;
padding: 6px 5px;
border-collapse: collapse;
font-size:12px;
}
.tableStyle .tdClass {
padding: 5px 5px;
border: solid 1px #E1E4E8;
}
.tdClass input {border:#AECAF0 1px solid; }

        .tableStyle td
        {
        }
        .tdwth
        {
            width: 130px;
         }
      
        .tableStyle th
        {
            text-align: right;
            padding: 6px 5px;
            border: solid 1px black;
        }
        .tableStyle .button
        {
            margin: 2px 0px 0px 2px;
            float: left;
        }
        
        text
        {
            border: 1px solid #aecaf0;
        }
    </style>
</head>
<body>
    @using (Html.BeginForm("TaxAuditPolicyEvalSave", "TaxAuditPolicyEval", FormMethod.Post, new { id = "form1" }))
    {
        @Html.Hidden("hidType", ViewData["type"])
        @Html.Hidden("hidFStatus", ViewData["FStatus"])
        @Html.Hidden("hidNSRBM", Model.NSRBM)
        @Html.Hidden("hidNSRDZDAH", Model.NSRDZDAH)
        @Html.Hidden("hidFYear", ViewData["FYear"])
        @Html.Hidden("hidFTaxAuditId", Model.FTaxAuditId)
        @Html.Hidden("hidBeginDate", Model.RKRQ_Q)
        @Html.Hidden("hidEndDate", Model.RKRQ_Z)
        @Html.Hidden("hdjsAlert", (ViewData["jsAlert"]));
        @Html.Hidden("noList", ViewData["noList"])
        @Html.Hidden("hidFIsByTaxFinanceProp", ViewData["FIsByTaxFinanceProp"])
        @Html.DevExpress().Menu(settings =>
   {
       settings.Name = "toolBarMenu";
       settings.ItemAutoWidth = false;
       settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
       settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
       settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
       settings.Items.Add(item =>
       {
           item.Name = "btnSubmit";
           item.Text = "发送";
           item.Image.Url = Url.Content("~/Content/ControlImages/edit_add.png");
       });
       settings.Items.Add(item =>
       {
           item.Name = "btnSave";
           item.Text = "保存";
           item.Image.Url = Url.Content("~/Content/ControlImages/button_save.png");
       });
       settings.Items.Add(item =>
       {
           item.Name = "btnReturn";
           item.Text = "退回";
           item.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
       });
       settings.Items.Add(item =>
       {
           item.Name = "btnback";
           item.Text = "返回";
           item.Image.Url = Url.Content("~/Content/ControlImages/back.png");
       });

       settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
       settings.ItemLinkMode = ItemLinkMode.ContentBounds;
   }).GetHtml()

        <br />
        <table align="center" class="tableForm">
            <tr>
                <td align="right" style="width: 150px" class="tdClass">
                    纳税人编码：
                </td>
                <td class="tdClass">
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "NSRBM";
                   settings.Text = Model.NSRBM;
                   settings.Enabled = false;
                   settings.Width = 250;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
                <td align="right" style="width: 150px" class="tdClass">
                    日期：
                </td>
                <td class="tdClass">
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "rq";
                   settings.Text = Model.RKRQ_Q.ToString("yyyy-MM-dd") + "至" + Model.RKRQ_Z.ToString("yyyy-MM-dd");
                   settings.Enabled = false;
                   settings.Width = 250;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 150px" class="tdClass">
                    纳税人名称：
                </td>
                <td class="tdClass">
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "NSRMC";
                   settings.Text = Model.NSRMC;
                   settings.Enabled = false;
                   settings.Width = 250;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
                </td>
                <td align="right" style="width: 150px" class="tdClass">
                    补贴方式：
                </td>
                <td class="tdClass">
                    @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "FAllowanceClassNo";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = 250;
                   settings.Properties.TextField = "FAllowanceName";
                   settings.Properties.ValueField = "FAllowanceClassNo";
                   settings.Enabled = false;
               }).BindList(ViewData["AllowanceClassList"]).Bind(Model.FAllowanceClassNo).GetHtml()
                </td>
            </tr>
            <tr>
                <td style="width: 150; text-align: right" class="tdClass">
                    企业性质：
                </td>
                <td class="tdClass">
                    @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "FEnterprisePropNo";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Properties.TextField = "FEnterprisePropName";
                   settings.Properties.ValueField = "FEnterprisePropNo";
                   settings.Width = 250;
                   settings.Properties.ClientSideEvents.SelectedIndexChanged = "Changed";
               }).BindList(ViewData["EnterprisePropList"]).Bind(Model.FNewEnterprisePropNo).GetHtml()
                </td>
                @if (ViewData["FIsByTaxFinanceProp"].ToString() == "N")
                {
                    <td style="width: 150; text-align: right" class="tdClass">
                        资金性质：
                    </td> 
                    <td class="tdClass">
                        @Html.DevExpress().ComboBox(settings =>
                   {
                       settings.Name = "FFinancePropNo";
                       settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                       settings.Properties.TextField = "FFinancePropShortName";
                       settings.Properties.ValueField = "FFinancePropNo";
                       settings.Width = 250;
                       settings.Properties.EnableClientSideAPI = true;
                   }).BindList(ViewData["FinancePropList"]).Bind(Model.FNewFinancePropNo).GetHtml()
                    </td>

                }
                else
                {
                    <td class="tdClass" colspan="2">
                    </td>
                }
            </tr>
            <tr>
                <td style="width: 150; text-align: right" class="tdClass">
                    鉴定说明：
                </td>
                <td class="tdClass" colspan="3">
                 @*   @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FPolicyNote";
                   settings.Width = 250;
                   settings.Text = Model.FPolicyNote;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()*@
                @Html.DevExpress().Memo(settings =>
 {
     settings.Name = "FPolicyNote";
     settings.Text = Model.FPolicyNote;
     settings.Width = System.Web.UI.WebControls.Unit.Percentage(86);
     settings.Properties.Rows = 2;
    
 }).GetHtml()
                </td>
              @*  <td colspan='2'>
       <font Color="red" > 注：补贴额单位为“万元”</font>
                </td>*@
                
            </tr>
        </table>
        <br />
        <div id="tabs" class="div">
            <ul>
                <li><a href="#TaxData">税款数据</a></li>
                <li><a href="#YearData">上年度数据</a></li>
            </ul>
            <div id="TaxData" style="height: 550px">
                <table class="tableStyle">
                    <tr style=" background:#DEEDF7; color:#0070A3;font-weight:bold ;padding:10px 0px ">

                        <td class="tdClass" align="center" style="width: 40px;padding:10px 0px">
                            明细
                        </td>
                        <td class="tdClass" nowrap align="center" style="width: 65px;">
                            税种
                        </td>
                 @*       @if (ViewData["FIsByTaxFinanceProp"].ToString() == "Y")
                        {
                            <td class="tdClass" align="center" style="width: 80px">
                                经济类型
                            </td>
                        }*@
                        <td colspan="2" class="tdClass" align="center" width="130px">
                            实缴金额
                        </td>
                        <td class="tdClass" align="center" style="width: 115px;">
                            补贴方式
                        </td>
                        <td class="tdClass" align="center" style="width: 130px;">
                            基数
                        </td>
                        <td class="tdClass" align="center" style="width: 80px;">
                            基数内补贴率
                        </td>
                        <td class="tdClass" align="center" style="width: 80px;">
                            基数外补贴率(补贴率)
                        </td>
                        <td class="tdClass" align="center">
                            补贴额(万元)
                        </td>
                    </tr>
                    @foreach (System.Data.DataRow sDr in (ViewData["sDt"] as System.Data.DataTable).Rows)
                    {
                        baseSum += (sDr["base"].ToString() == "" ? 0 : decimal.Parse(sDr["base"].ToString()));
                        allowanceAmountSum += (sDr["FAllowanceAmount"].ToString() == "" ? 0 : decimal.Parse(sDr["FAllowanceAmount"].ToString()));
                        seSum += (sDr["se"].ToString() == "" ? 0 : decimal.Parse(sDr["se"].ToString()));
                        <tr>
                            <td rowspan="2" class="tdClass">
                            <img title="查看明细" src="@Url.Content("~/Content/ControlImages/button_query.png")" alt="查看明细" onclick="look('@sDr["FTaxClassAllowanceNo"]')" />
                               @* <a href="#" onclick="look('@sDr["FTaxClassAllowanceNo"]')">明细</a>*@
                            </td>
                            <td rowspan="2" class="tdClass">
                                @sDr["FTaxClassAllowanceName"]
                                <input type="hidden"  value='@sDr["FIsEvalBase"]'   id="@sDr["FTaxClassAllowanceNo"]FIsEvalBase"  name="@sDr["FTaxClassAllowanceNo"]FIsEvalBase"  style="width:80px;"  />
                            </td>
                            <td colspan ="2" class="tdClass" width="130px">
                                <input type="text"  value='@sDr["se"]' readonly style=" text-align:right; width:95%; border:#AECAF0 1px solid; background-color:#f7f7f7" id="@sDr["FTaxClassAllowanceNo"]txtse"  name="@sDr["FTaxClassAllowanceNo"]txtse"  style="width:80px;"  />
                            </td>
                            <td class="tdClass" width="113px">
                                @if (sDr["FAllowanceType"].ToString() != "2")
                                {
                                    <input type="radio" checked="checked" onclick="redValueChanged('@sDr["FTaxClassAllowanceNo"]','1')" name="@sDr["FTaxClassAllowanceNo"]type" id="@sDr["FTaxClassAllowanceNo"]type" style="border:0px;" value='1'/>@:按率
      <input type="radio" onclick="redValueChanged('@sDr["FTaxClassAllowanceNo"]','2')" name="@sDr["FTaxClassAllowanceNo"]type" id="@sDr["FTaxClassAllowanceNo"]type" style="border:0px;"  value='2'/>@:按额
                 }
                                else
                                {
                                    <input type="radio" onclick="redValueChanged('@sDr["FTaxClassAllowanceNo"]','1')" name="@sDr["FTaxClassAllowanceNo"]type" id="@sDr["FTaxClassAllowanceNo"]type" style="border:0px;"  value='1'/>@:按率
      <input type="radio" checked="checked"  onclick="redValueChanged('@sDr["FTaxClassAllowanceNo"]','2')" name="@sDr["FTaxClassAllowanceNo"]type" id="@sDr["FTaxClassAllowanceNo"]type" style="border:0px;"  value='2'/>@:按额
                                                                                 }
                            </td>
                            <td class="tdClass">
                                <input type="text" value='@sDr["base"]' style=" text-align:right;width:95%;" id="@sDr["FTaxClassAllowanceNo"]txtbase"  name="@sDr["FTaxClassAllowanceNo"]txtbase" onchange="ValueChanged('@sDr["FTaxClassAllowanceNo"]')"   />
                            </td>
                            <td class="tdClass">
                                <input type="text"   value='@sDr["rateIn"]' style=" text-align:right;width:80px;" id="@sDr["FTaxClassAllowanceNo"]txtrateIn"  name="@sDr["FTaxClassAllowanceNo"]txtrateIn" onchange="ValueChanged('@sDr["FTaxClassAllowanceNo"]')"   />
                            </td>
                            <td class="tdClass">
                                <input type="text" value='@sDr["rateOut"]' style=" text-align:right;width:80px;" title="@sDr["rateOut"]" id="@sDr["FTaxClassAllowanceNo"]txtrateOut" onchange="ValueChanged('@sDr["FTaxClassAllowanceNo"]')"  name="@sDr["FTaxClassAllowanceNo"]txtrateOut"   />
                            </td>
                            <td class="tdClass">
                                <input type="text"  onchange="jsSum()" value='@sDr["FAllowanceAmount"]'  style=" text-align:right; width:95%" id="@sDr["FTaxClassAllowanceNo"]txtFAllowanceAmount"  name="@sDr["FTaxClassAllowanceNo"]txtFAllowanceAmount"  style="width:80px;"  />
                                <script>                                    redValueChanged('@sDr["FTaxClassAllowanceNo"]', '@sDr["FAllowanceType"]')</script>
                            </td>
                        </tr>
                    
                        <tr>
                            <td  class="tdClass"style=" text-align:center ;color:#0070A3;font-weight:bold" width="35px">
                                政&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;策
                            </td>
                            @if (ViewData["FIsByTaxFinanceProp"].ToString() == "Y")
                            {
                                <td colspan="4" class="tdClass" width="310px">
                                    <input type="hidden" id="@sDr["FTaxClassAllowanceNo"]FIsPolicy" value="@sDr["FIsPolicy"]" />
                                    @if (sDr["FIsPolicy"] == "Y")
                                    {
                                        <select style=" text-align:left; width:99%; border:#AECAF0 1px solid;" onchange="ValueChanged2(this,'@sDr["FTaxClassAllowanceNo"]')" id="@sDr["FTaxClassAllowanceNo"]FPolicyID" name="@sDr["FTaxClassAllowanceNo"]FPolicyID" >
                                            @foreach (EnterpriseFund.Model.SupportPolicy sp in xzSupportPolicy)
                                            {
                                                if (sp.FTaxClassAllowanceNo == sDr["FTaxClassAllowanceNo"].ToString())
                                                {
                                                    if (sp.FPolicyID == sDr["FPolicyID"].ToString())
                                                    {
                                                <option selected="selected" value=@sp.FPolicyID>@sp.FPolicyName</option> 
                                                    }
                                                    else
                                                    {
                                                <option value=@sp.FPolicyID>@sp.FPolicyName</option>  
                                                    }
                                                }
                                            }
                                        </select>
                                    }
                                </td>
                                <td colspan="1" class="tdClass" style=" text-align:center ;color:#0070A3;font-weight:bold" >
                                    资金性质
                                </td>
                               
                                <td colspan="1" class="tdClass">
                                    <select style=" width:110px" id="@sDr["FTaxClassAllowanceNo"]FinanceProp" name="@sDr["FTaxClassAllowanceNo"]FinanceProp" >
                                        @foreach (EnterpriseFund.Model.FinanceProp fp in financePropList)
                                        {
                                            if (fp.FFinancePropNo == sDr["FFinancePropNo"].ToString())
                                            {
                                            <option  selected="selected" value=@fp.FFinancePropNo>@fp.FFinancePropName</option> 
                                            }
                                            else
                                            {
                                            <option  value=@fp.FFinancePropNo>@fp.FFinancePropName</option>  
                                            }
                                        }
                                    </select>
                                </td>
                               
                            }
                            else
                            { 
                     
                                <td colspan="6" class="tdClass">
                                    <input type="hidden" id="@sDr["FTaxClassAllowanceNo"]FIsPolicy" value="@sDr["FIsPolicy"]" />
                                    @if (sDr["FIsPolicy"] == "Y")
                                    {
                                        <select style=" text-align:left; width:97%; border:#AECAF0 1px solid;" onchange="ValueChanged2(this,'@sDr["FTaxClassAllowanceNo"]')" id="@sDr["FTaxClassAllowanceNo"]FPolicyID" name="@sDr["FTaxClassAllowanceNo"]FPolicyID" >
                                            @foreach (EnterpriseFund.Model.SupportPolicy sp in xzSupportPolicy)
                                            {
                                                if (sp.FTaxClassAllowanceNo == sDr["FTaxClassAllowanceNo"].ToString())
                                                {
                                                    if (sp.FPolicyID == sDr["FPolicyID"].ToString())
                                                    {
                                                <option selected="selected" value=@sp.FPolicyID>@sp.FPolicyName</option> 
                                                    }
                                                    else
                                                    {
                                                <option value=@sp.FPolicyID>@sp.FPolicyName</option>  
                                                    }
                                                }
                                            }
                                        </select>
                                    }
                                </td>
                            }
                        </tr>
                    }
                    <tr>
                        <td class="tdClass" align="center">
                            合计
                        </td>
                        <td class="tdClass" align="center">
                        </td>
                     @*   @if (ViewData["FIsByTaxFinanceProp"].ToString() == "Y")
                        {
                            <td class="tdClass" align="center">
                            </td>
                        }*@
                        <td class="tdClass"colspan="2" width="130px" align="right" id='zjse'>@decimal.Round(seSum, 0)
                        </td>
                        <td class="tdClass" align="center">
                        </td>
                        <td class="tdClass" align="right" id='zjbase'>@decimal.Round(baseSum,0)
                        </td>
                        <td class="tdClass" align="center">
                        </td>
                        <td class="tdClass" align="center">
                        </td>
                        <td  class="tdClass" align="right" id='zjallowanceAmount'>@decimal.Round(allowanceAmountSum, 2).ToString("#0.00 ")
                        </td>
                    </tr>
                </table>
            </div>
            <div id="YearData" style="height: 550px">
                <iframe  id='contentleft2' name='contentleft2' style='width:100%;height:100%' frameborder='0' src=' @Url.Action("YearDataShow", "TaxAuditPolicyEval", new { year = Model.FYear - 1, NSRDZDAH = Model.NSRDZDAH })'>
                </iframe>
            </div>
        </div> 
    }
    @*@Html.DevExpress().PageControl(
    settings =>
    {
        settings.Name = "tabCtlGroup";
        settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
        //settings.Height = System.Web.UI.WebControls.Unit.Pixel(600);
        settings.Styles.Content.Border.BorderWidth = 0;
        settings.TabPages.Add("税款数据").SetContent("<iframe  id='contentleft' name='contentleft' style='width:100%;height:100%' frameborder='0' src='" + Url.Action("TaxAuditFormShowDate", "TaxAuditForm", new { NSRBM = ViewData["NSRBM"], beginDate = ViewData["beginDate"], endDate = ViewData["endDate"] }) + "'></iframe>");
        settings.TabPages.Add("调整数据").SetContent("<iframe  id='contentleft' name='contentleft' style='width:100%;height:100%' frameborder='0' src='" + Url.Action("TaxAuditAdjustIndex", "TaxAuditForm") + "'></iframe>");
    }).GetHtml()
*@
    <script>
        lp.Hide();
    </script>
</body>
</html>
